package com.lanyam.travel.base.dao;

import java.util.List;

import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanyam.travel.base.entity.Permission;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author rosson
 * @since 2020-01-24
 */
public interface PermissionMapper extends BaseMapper<Permission> {

	@Select("select * from permission where id in(select permission_id from user_permission where user_id = #{userId})")
	List<Permission> selectPermissionsInUser(String userId);
}
